package xyz.yzy.coc.dict.service;

import java.util.List;
import java.util.UUID;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import xyz.yzy.coc.custom.CommonService;
import xyz.yzy.coc.dict.entity.SysDept;
import xyz.yzy.coc.dict.repository.SysDeptRepository;


@Service
public class SysDeptService extends CommonService<SysDept, UUID>{
	@Autowired
	private SysDeptRepository sysDeptDAO;

	public List<SysDept> findByParentIsNullOrderByIdx1() {
		return sysDeptDAO.findByParentIsNullOrderByIdx1();
	}

	public List<SysDept> findByParent_id(UUID id) {
		return sysDeptDAO.findByParent_id(id);
		
	}
}
